import request from '@/utils/request'

/**
 * 发送面试邀约
 * @param query
 * @returns {AxiosPromise}
 */
export function sendInterview(query) {
  return request({
    url: 'interview/send',
    method: 'post',
    params: query
  })
}

/**
 * 加载邀约面试列表
 * @param query
 * @returns {AxiosPromise}
 */
export function fetchInterviewList(query) {
  return request({
    url: 'interview/get',
    method: 'post',
    params: query
  })
}

/**
 * 再次发送邀约
 * @param query
 */
export function inviteAgain(query) {
  return request({
    url: 'interview/again',
    method: 'post',
    params: query
  })
}

/**
 * 撤回邀约
 * @param query
 */
export function withdrawInterview(query) {
  return request({
    url: 'interview/withdraw',
    method: 'post',
    params: query
  })
}

/**
 * 获取邀约信息
 * @param query
 */
export function getOne(query) {
  return request({
    url: 'interview/get/one',
    method: 'post',
    params: query
  })
}

/**
 * 更新面试邀约
 * @param query
 */
export function updateInterview(query) {
  return request({
    url: 'interview/update',
    method: 'post',
    params: query
  })
}
